package com.ek.distmpl.web.test;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.ek.distmpl.api.app.AppService;
import com.ek.distmpl.core.controller.BaseController;
import com.ek.distmpl.dao.model.App;
import com.ek.distmpl.dao.model.AppExample;
import com.ek.distmpl.dao.model.AppExample.Criteria;

@Controller
@RequestMapping("/app")
public class APPController extends BaseController {

	@Autowired
	private AppService appService;
	
	@RequestMapping("/version")
	public @ResponseBody List<App> getVersion()
	{
		AppExample example=new AppExample();
		Criteria criteria=example.createCriteria();
		criteria.andAppReleaseTimeIsNotNull();
		example.setOrderByClause("app_release_time asc");
		List<App> apps=appService.selectByExample(example);
		return apps;
	}
}
